package test;

import utils.sl651.SL651GenMsgUtil;
import utils.sl651.SL651Message;
import utils.sl651.SL651MessageValidator;
import utils.sl651.SL651Protocol;

/**
 * SL651协议测试工具类
 * 
 * 提供测试和调试功能，供开发和测试使用
 */
public class SL651TestUtil {
    
    public static void main(String[] args) throws Exception {
        String message = "7E7E010012345678123430002B020003591011154947F1F1001234567848F0F059101115492019000005261900000539230000012738121115ff 02 1b 02 55 74ff 03 08 20 45 20 00 00 04 00032272";
        SL651Message messageInfo = SL651MessageValidator.getMessageInfo(message);
        System.out.println(messageInfo);

        message = SL651GenMsgUtil.generateHexTimerMessage();
        messageInfo = SL651MessageValidator.getMessageInfo(message);
        System.out.println(messageInfo);

        String message2 = SL651GenMsgUtil.generateAsciiTestMessage();
        SL651Message messageInfo2 = SL651MessageValidator.getMessageInfo(message2);
        System.out.println(messageInfo2);

        message2 = "7E7E0100530723721234320072020011241016130100F1F100530723724BF0F024101613002019000000261900091022190000003B2301253247FE302200001062FE202300099282FE10110214FE0019061860FE312200000928FE212300086170FE11110211FE0119056970452000000400FF021B025574FF03082038121421038F77";
        messageInfo2 = SL651MessageValidator.getMessageInfo(message2);
        System.out.println(messageInfo2);

    }
    

}